import React, { Component, PropTypes } from 'react';

class Navtitle extends Component {
  static propTypes: {
    handleClick: PropTypes.func.isRequired
  };

  constructor(props) {
    super(props);
    this.onClick = this.onClick.bind(this);
    this.state = {
      type: "get_name",
      name: "yinzi"
    }
  }

  onClick() {
    this.props.handleClick();
  }

  render() {
    const value = this.state.name;
    const { handleClick } = this.props;
    return (
      <div className="nav-title">
        <a className="edit" onClick={this.onClick}></a>
        <span>
          {value}的地图
        </span>
      </div>
    );
  }
};

export default Navtitle;





